package com.regent.central.bill.service.bean;

import com.regent.central.bill.core.ReturnGoodsRemark;
import com.regent.central.bill.repository.ReturnGoodsRemarkMapper;
import com.regent.central.bill.service.ReturnGoodsRemarkService;
import com.regent.central.infrastructure.service.bean.DomainServiceBean;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ReturnGoodsRemarkServiceBean extends DomainServiceBean<ReturnGoodsRemarkMapper, ReturnGoodsRemark> implements ReturnGoodsRemarkService {
    /**
     * 伪删除退货备注
     *
     * @param returnGoodsRemarkId 退货备注ID
     * @param userDeleted         删除人
     */
    @Override
    public void hide(String returnGoodsRemarkId, String userDeleted) {
        mapper.hide(returnGoodsRemarkId, userDeleted, System.currentTimeMillis());
    }

    /**
     * 获取退货货品备注列表
     *
     * @param returnGoodsId 退货货品ID
     * @return 退货货品备注列表
     */
    @Override
    public List<ReturnGoodsRemark> getReturnGoodsRemarks(String returnGoodsId) {
        return mapper.getReturnGoodsRemarks(returnGoodsId);
    }
}